﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AyuBookmark.Common.Models
{
    [Table("images")]
    public class Image
    {
        [Key]
        [Column("id")]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [Required]
        [Column("content_hash")]
        [StringLength(64)]
        public string ContentHash { get; set; }

        [Required]
        [Column("local_path")]
        public string LocalPath { get; set; }

        [Column("created_date")]
        public DateTime CreatedDate { get; set; } = DateTime.Now;
    }
}